<form name="frm" action="<?php echo $this->site['base_url']?>admin_programs/save" method="post" enctype="multipart/form-data">

<table class="title" cellspacing="0" cellpadding="0">

  <tr>

    <td class="title_label"><?php echo Kohana::lang('programs_lang.tt_page')?></td>

    <td class="title_button">

    <button type="button" name="btn_back" class="button back" onclick="javascript:location.href='<?php echo $this->site['base_url']?>admin_programs/search'">

    <span><?php echo Kohana::lang('admin_lang.btn_back')?></span>

    </button>
    <button type="reset" name="btn_reset" class="button reset"/>

    <span><?php echo Kohana::lang('admin_lang.btn_reset')?></span>

    </button>
	  <button type="submit" name="btn_save" class="button save">

    <span><?php echo Kohana::lang('admin_lang.btn_save')?></span>

    </button>

    </td>

  </tr>

</table>

<table class="form" cellspacing="0" cellpadding="5">

  	<tr>
        <td nowrap="nowrap"><?php echo Kohana::lang('admin_lang.lbl_order')?>:</td>
        <td width="214"><input name="txt_sort_order" class="text_number" size="8" value="<?php if (isset($mr[0]['programs_sort_order'])){ echo $mr[0]['programs_sort_order']; } else {echo $mr[0]['max']+1;}?>" /></td>
  	    <td width="86" align="right"><?php echo Kohana::lang('events_lang.lbl_time_begin')?>:</td>
  	    <td width="541"><input name="txt_begin_date" type="text" id="txt_begin_date" size="10" readonly value="<?php if (isset($mr[0]['programs_begin_date'])){ echo date('m/d/Y',$mr[0]['programs_begin_date']); }else {echo ''; }?>" >	
<a  onClick="if(self.gfPop)gfPop.fPopCalendar(document.frm.txt_begin_date);return false;" >
<img align="absmiddle" src="<?php echo $this->site['base_url']?>themes/plugins/calendar/calbtn.gif" border="0" ></a></td>
  	</tr>
	<tr>
	  	<td><?php echo Kohana::lang('admin_lang.lbl_status')?>:</td>
        <td>
        <select name="sel_status" id="sel_status">
            <option value="1" <?php if(isset($mr[0]['programs_status']) && $mr[0]['programs_status']==1) echo 'selected'?> ><?php echo Kohana::lang('admin_lang.lbl_active')?></option>
			<option value="0"><?php echo Kohana::lang('admin_lang.lbl_inactive')?></option>	
        </select>          	       </td>
	    <td align="right"><?php echo Kohana::lang('events_lang.lbl_time_end')?>:</td>
	    <td><input name="txt_end_date" type="text" id="txt_end_date" size="10" readonly value="<?php if (isset($mr[0]['programs_end_date'])){ echo date('m/d/Y',$mr[0]['programs_end_date']); }else {echo ''; }?>" >	
<a  onClick="if(self.gfPop)gfPop.fPopCalendar(document.frm.txt_end_date);return false;" >
<img align="absmiddle" src="<?php echo $this->site['base_url']?>themes/plugins/calendar/calbtn.gif" border="0" ></a></td>
	</tr>
	<tr>
      <td  valign="top" nowrap="nowrap"><?php echo Kohana::lang('programs_lang.lbl_investment')?></td>
      <td colspan="3"><input name="txt_investment" type="text" value="<?php if (isset($mr[0]['programs_investment'])){ echo $mr[0]['programs_investment']; }?>" /></td>
    </tr>
	<?php for($i=0; $i<count($list_language); $i++){ ?>
    
    <tr>
    <td  valign="top" nowrap="nowrap"><?php echo Kohana::lang('programs_lang.lbl_title')?>: <font color="#FF0000">*</font> [<?php echo $list_language[$i]['languages_name']?>]</td>
    <td colspan="3"><div style="float:left;">
        <input type="text" value="<?php if (isset($mr[$i]['programs_title'])) echo $mr[$i]['programs_title']; ?>" id="txt_title<?php echo $list_language[$i]['languages_id']?>" name="txt_title<?php echo $list_language[$i]['languages_id']?>" size="95"/>
        <input type="hidden" id="hd_old_image" name="hd_old_image" value="<?php if (isset($mr[0]['categories_image'])) echo $mr[0]['categories_image']; ?>" />
      </div>
      <div style="float:left;padding-left:10px;"> <img src="<?php echo $this->site['base_url']?>uploads/language/<?php echo $list_language[$i]['languages_image']?>" width="20" id="img_language1" name="img_language1" height="20" /> </div>    </td>
    </tr>
    <?php }?>
	<?php for($i=0; $i<count($list_language); $i++){ ?>
     <tr>
      <td valign="top" nowrap="nowrap"><?php echo Kohana::lang('programs_lang.lbl_description')?>: <font color="#FF0000">*</font> [<?php echo $list_language[$i]['languages_name']?>]</td>
      <td colspan="3"> 
	  <div style="float:left;">
	  <textarea id="txt_description<?php echo $list_language[$i]['languages_id']?>" name="txt_description<?php echo $list_language[$i]['languages_id']?>" cols="25" style="width:600px;height:50px"><?php if (isset($mr[$i]['programs_description'])) echo $mr[$i]['programs_description']; ?></textarea>
	  </div>
      <div style="float:left;padding-left:10px;"> <img src="<?php echo $this->site['base_url']?>uploads/language/<?php echo $list_language[$i]['languages_image']?>" width="20" id="img_language1" name="img_language1" height="20" /> </div>	  </td>
    </tr>
    <?php }?>
	<tr>
      <td width="75" align="right" valign="top"><strong><?php echo Kohana::lang('programs_lang.lbl_image')?>:</strong></td>
      <td colspan="3"  align="left" valign="top"><input name="txt_image" type="file" /></td>
    </tr>
	<tr>
      <td width="75" align="right" valign="top"></td>
      <td colspan="3"  align="left" valign="top">
	  <?php if(isset($mr[0]['programs_image']) && $mr[0]['programs_image']){ ?>
      <p><img src="<?php echo $this->site['base_url']?>uploads/programs/<?php echo $mr[0]['programs_image']?>">
        <a href="<?php echo $this->site['base_url']?>admin_programs/delete_image/<?php echo $mr[0]['programs_id']?>"><?php echo Kohana::lang('admin_lang.btn_delete')?></a>        </p>
      <?php } ?>	  </td>
    </tr>
	 <?php for($i=0; $i<count($list_language); $i++){ ?>

   

    <tr>

      <td width="75" valign="top" nowrap="nowrap"><?php echo Kohana::lang('programs_lang.lbl_content')?>: <font color="#FF0000">*</font> [<?php echo $list_language[$i]['languages_name']?>]      </td>

      <td colspan="3"><img src="<?php echo $this->site['base_url']?>uploads/language/<?php echo $list_language[$i]['languages_image']?>" width="20" id="img_language1" name="img_language1" height="20" /></td>
    </tr>

    <tr>

        <td colspan="4" valign="top">

        <textarea class="ckeditor" id="txt_content<?php echo $list_language[$i]['languages_id']?>" name="txt_content<?php echo $list_language[$i]['languages_id']?>" cols="50" style="width:800px;height:100px"><?php if (isset($mr[$i]['programs_content'])) echo $mr[$i]['programs_content']; ?></textarea>        </td>
    </tr>

    <?php }?>

    <input name="hd_id" type="hidden" id="hd_id" value="<?php echo isset($mr[0]['programs_id'])?$mr[0]['programs_id']:''?>"/>
</table>

</form>

<script language="javascript" src="<?php echo $this->site['base_url']?>/themes/plugins/ckeditor/ckeditor.js"></script>

<link rel="stylesheet" type="text/css" href="<?php echo $this->site['base_url']?>themes/plugins/tabcontent/tabcontent.css">

<script type="text/javascript" src="<?php echo $this->site['base_url']?>themes/plugins/tabcontent/tabcontent.js"></script>

<script type="text/javascript">

var countries=new ddtabcontent("product_tab")

countries.setpersist(true)

countries.setselectedClassTarget("link") //"link" or "linkparent"

countries.init()

</script>

<iframe width=174 height=189 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="<?php echo $this->site['base_url']?>themes/plugins/calendar/ipopeng.htm" scrolling="no" frameborder="0" 

style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">

</iframe>